package com.esrc.web.controller.PeakShaving;

import com.esrc.web.dto.RegionTreeDTO;
import com.esrc.web.service.RegionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description:
 * @author: lx
 * @time: 2025/6/16
 */
@RestController
@RequestMapping("/peakShaving/regions")
@Api(tags = "地区信息")
@Slf4j
public class RegionController {
    @Autowired
    private RegionService regionService;

    @GetMapping("/tree")
    @ApiOperation(value = "获取全部地区信息")
    public List<RegionTreeDTO> getRegionTree() {
        return regionService.getRegionTree();
    }

}
